home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 7.5 KB | 287 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.r
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #define SystemSevenOrBetter 1 // we want the extended types
- #define SystemSevenOrLater 1 // Types.r uses this variable
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "CodeFragmentTypes.r"
-
- #include "ODTypes.r"
- #include "Cyberdog.h"
- #include "FWBldDef.h"
- #include "Binding.h"
-
- //-------------------------------------------------------------------------------------
- // cfrg Resource
- //-------------------------------------------------------------------------------------
-
- resource 'cfrg' (0) {
- {
- //
- // Fully qualified Name (SOMMODULE::SOMCLASS)
- //
- #ifdef FW_BUILD_MAC68K
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib, kNoVersionNum, kNoVersionNum, kDefaultStackSize, kNoAppSubFolder, kIsLib, kOnDiskFlat, kZeroOffset, kWholeFork,
- kEditor,
-
- //
- // Partially qualified Name (SOMCLASS only)
- // Otherwise identical to above
- //
- #ifdef FW_BUILD_MAC68K
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib, kNoVersionNum, kNoVersionNum, kDefaultStackSize, kNoAppSubFolder, kIsLib, kOnDiskFlat, kZeroOffset, kWholeFork,
- "ODFCyberStarter"
- }
- };
-
- //-------------------------------------------------------------------------------------
- // NMAP Constants
- //-------------------------------------------------------------------------------------
-
- #define kKindCategoryMapID 128
- #define kEditorKindMapID 129
- #define kEditorUserStringMapID 130
- #define kKindUserStringMapID 131
- #define kCategoryUserStringMapID 132
- #define kOldMacOSTypeMapID 133
- #define kEditorPlatformKinds 134
-
- //-------------------------------------------------------------------------------------
- // NMAP Resources
- //
- // kODEditorKinds What kinds can this part open? (both OpenDoc and MIME)
- // kODKindOldMacOSType What icon to use for each kind?
- // kODEditorPlatformKind What mac files can be translated to this part?
- // kODKind Why category does this parts kinds belong to?
- // kODEditorUserString English/etc name for the part.
- // kODKindUserString English/etc name for the kind.
- // kODCategoryUserString English/etc name for the category (if non-standard).
- //-------------------------------------------------------------------------------------
-
- // These depend on the binding information (Binding.h)
- #define kCyberKindID kODISOPrefix kMimeType
- #define kCyberKindID2 kODISOPrefix kMimeType2
-
- // A CyberItem (X) which points to some item (Y) will have the
- // same data kind as Y, only with "Apple:Cyberdog:Kind:CyberItem:MIME:" in
- // the middle. We never really need to deal with this, except in the
- // kODKindOldMacOSType namp, where we specify which icon to use for the
- // CyberItem.
- #define kURLKind kODISOPrefix "Apple:Cyberdog:Kind:CyberItem:MIME:" kMimeType
- #define kURLKind2 kODISOPrefix "Apple:Cyberdog:Kind:CyberItem:MIME:" kMimeType2
-
- resource kODNameMappings (kKindCategoryMapID) {
- kODKind, {
- //
- // What "categories" does our part data fall into?
- // This information is only used to group editors in Editor Setup and
- // the Document Info window and isn't used during part binding.
- //
- kKind, kODIsAnISOStringList {{
- kCategory
- }}
- }
- };
-
- resource kODNameMappings (kEditorKindMapID) {
- kODEditorKinds, {
- //
- // ****IMPORTANT*****
- // What kinds of data will be opened by this editor?
- // If you list a data type here then OpenDoc will open your part when
- // it sees that kind of data.
- // You ****MUST**** list your data kinds here to get your part opened by Cyberdog.
- // If OpenDoc has multiple parts for the same kind of data, then it will
- // use Editor Setup to decide which part to use. But if your part is the only one
- // then you don't need to bother with Editor Setup.
- //
- kEditor, kODIsAnISOStringList {{
- kKind, // OpenDoc data kind
- kMIMEPrefix kMimeType, // Cyberdog data kind
- kMIMEPrefix kMimeType2, // Cyberdog data kind
- kCyberPartKind // this is a hack required by Cyberdog
- }}
- }
- };
-
- resource kODNameMappings (kEditorUserStringMapID) {
- kODEditorUserString, {
- kEditor, kODIsINTLText {
- smRoman, langEnglish, "ODF CyberStarter R2"
- }
- }
- };
-
- resource kODNameMappings (kKindUserStringMapID) {
- kODKindUserString, {
- kKind, kODIsINTLText {
- smRoman, langEnglish, "Text"
- },
- kCyberKindID, kODIsINTLText {
- smRoman, langEnglish, "Text Alias"
- },
- kCyberKindID2, kODIsINTLText {
- smRoman, langEnglish, "Text Alias"
- }
- }
- };
-
- #if 0
-
- resource kODNameMappings (kCategoryUserStringMapID) {
- kODCategoryUserString, {
- //
- // This string is displayed in the Editor Setup control panel. It describes
- // the group that your data kind(s) belong(s) to.
- // For instance: A Postscript kind belongs to the Text, Image, and Program categories.
- // Don't specify a CategoryUserString if you are using a standard OpenDoc category
- // (kODCategory...) (hence the #if 0 around this entry)
- // You should REALLY REALLY try to use a standard one (they are defined in <StdDefs.xh>)
- // If you have a custom category then change the #if 0 to a #if 1 above.
- //
- kCategory, kODIsINTLText {
- smRoman, langEnglish, "New Stuff"
- }
- }
- };
-
- #endif
-
- resource kODNameMappings (kOldMacOSTypeMapID) {
- kODKindOldMacOSType, {
- //
- // Icons
- // These are used only to determine what icon the finder displays for your
- // OpenDoc document and URL file (a.k.a. Cyberdog "CyberItem") in the Notebook.
- // These OSTypes are not related to binding and should be unique!
- //
- kKind, kODIsMacOSType { kDocumentIcon },
- kURLKind, kODIsMacOSType { kURLIcon },
- kURLKind2, kODIsMacOSType { kURLIcon }
- }
- };
-
- #if 0 // XXX need to handle in Internalize
- resource kODNameMappings (kEditorPlatformKinds) {
- kODEditorPlatformKind, {
- //
- // Data Translation
- // If you want your part to get created when standard files or data are dragged
- // into OpenDoc, you need to list them here.
- // For instance, if someone drags text or a text file into a container part,
- // we want CyberStarter (since it displays text) to get created. Therefore
- // we list TEXT here.
- //
- kEditor, kODIsPltfmTypeSpac {{
- kODPlatformFileType, kImportMacOSType, smRoman, langEnglish, "Text File", kCategory,
- kODPlatformDataType, kImportMacOSType, smRoman, langEnglish, "Text Data", kCategory
- }}
- }
- };
- #endif
-
- //-------------------------------------------------------------------------------------
- // Finder Bundle
- // I'm putting this here because we can use constants. I know it's a pain. We
- // really need a wizard for this kind of thing.
- //-------------------------------------------------------------------------------------
-
- resource 'BNDL' (128) {
- kPartSignature,
- 0, {
- 'FREF', {
- 0, 128
- },
- 'ICN#', {
- 0, 130
- }
- }
- };
-
- resource 'BNDL' (129) {
- kODShellSignature,
- 0, {
- 'FREF', {
- 1, 132,
- 2, 133,
- },
- 'ICN#', {
- 1, 128,
- 2, 129,
- }
- }
- };
-
- // Cyberdog Bundle
- // This is used to show icons for the "CyberItem" files (i.e. URLs) on the
- // desktop and in the Notebook.
-
- resource 'BNDL' (130) {
- kCyberdogCreator,
- 0, {
- 'FREF', {
- 0, 129
- },
- 'ICN#', {
- 0, 131
- }
- }
- };
-
- resource 'FREF' (128) {
- 'shlb',
- 0,
- ""
- };
-
- resource 'FREF' (132) {
- kDocumentIcon,
- 1,
- ""
- };
-
- resource 'FREF' (133) {
- kStationeryIcon,
- 2,
- ""
- };
-
- resource 'FREF' (129) {
- kURLIcon,
- 0,
- ""
- };
-
- type kODShellSignature { pstring; };
- type kPartSignature { pstring; };
- type kCyberdogCreator { pstring; };
-
- resource kODShellSignature (0) {
- ""
- };
-
- resource kPartSignature (0) {
- ""
- };
-
- resource kCyberdogCreator (0) {
- ""
- };
-
-